<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/common/includes.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="zzzzzz" xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>zzzzzz</title>
	<%@ include file="/WEB-INF/common/meta.jsp" %>
	<%@ include file="/WEB-INF/common/global_style.jsp" %>
	<%@ include file="/WEB-INF/common/global_script.jsp" %>
	<script type="text/javascript" src="${ctx}/res/js/follow_unfollow.js" ></script>
</head>
<body>

<%@ include file="/WEB-INF/common/header.jsp" %>

<div class="wrapper-content">
	<div id="connections" class="site-wrap wrap">
		<div class="clearfix right-sidebar mtl">
			<div class="content">
				<h3 class="mbl"><a href="${ctx}/profile/${profileOwner.userId}">${profileOwner.username}</a>'s Connections:</h3>
				<ul class="horizontal tabs-index">
					<li><a href="${ctx}/connections/following/${profileOwner.userId}" <c:if test="${tab == 'following' || tab == null || empty tab}">class="active"</c:if> >Following (${followingNum})</a></li>
					<li><a href="${ctx}/connections/followers/${profileOwner.userId}" <c:if test="${tab == 'followers'}">class="active"</c:if> >Followers (${followersNum})</a></li>
  				</ul>
  				
  				<c:choose>
					<c:when test="${tab == 'following' || tab == null || empty tab}">
						<%@ include file="include/connections/following.jsp" %>
					</c:when>
					<c:when test="${tab == 'followers'}">
						<%@ include file="include/connections/followers.jsp" %>
					</c:when>
				</c:choose>
				
			</div>
			<div class="sidebar">
				<%@ include file="include/connections/sidebar.jsp" %>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">

jq(document).ready(function() {
	
	new FollowUnfollow({
		'j_follow_unfollow_link' : jq('a[href="#follow_unfollow_link"]'),
		'_follow_url' : "${ctx}/users/follow",
		'_unfollow_url' : "${ctx}/users/unfollow"
	});
	
});

</script>

<%@ include file="/WEB-INF/common/footer.jsp" %>

</body>
</html>